<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <%if(articleList.length!=0){
        for(let i=0;i<articleList.length;i++){
        if(articleList[i].bookcase){ %>
    <title><%=articleList[i].bookcase.name %></title>
    <% break;}}}%>
    <% include ../../common/public.ejs %>
    <link rel="stylesheet" href="//cdn.bootcss.com/weui/1.1.1/style/weui.min.css">
    <link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/1.0.1/css/jquery-weui.min.css">
    <link href="<%= global.config.path.publicPath %>/custom/css/articleTemplate.css" rel="stylesheet">
</head>
<body>
<link rel="stylesheet" href="//cdn.bootcss.com/weui/1.1.1/style/weui.min.css">
<link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/1.0.1/css/jquery-weui.min.css">
<div class="weui-search-bar" id="searchBar">
    <form class="weui-search-bar__form" id="searchForm" method="get" onsubmit="return submitForm()" >
        <div class="weui-search-bar__box">
            <i class="weui-icon-search"></i>
            <input type="search" class="weui-search-bar__input" id="searchInput" placeholder="搜索" required="">
            <a href="javascript:" class="weui-icon-clear" id="searchClear"></a>
        </div>
        <label class="weui-search-bar__label" id="searchText">
            <i class="weui-icon-search"></i>
            <span>搜索</span>
        </label>
    </form>
    <a href="javascript:" class="weui-search-bar__cancel-btn" id="searchCancel">取消</a>
</div>
<div>

<%if(articleList.length!=0){%>
    <div class="out-container">
        <div class="sl-news-container">
            <% for(let i = 0;i < articleList.length;i++) {
                if(articleList[i].bookcase){
            %>
            <div class="sl-news-list">
                <a href="<%= articleList[i].thirdUrl|| global.config.path.contextPath+'/fengqi/article/articleView/'+articleList[i].code %>">
                    <div class="sl-news-panel weui-flex">
                        <div class=" sl-news-img">
                            <%if(articleList[i].img){%>
                            <img src="<%= global.config.path.publicPath %>/uploadFiles<%= articleList[i].img.filePath %>" alt="">
                            <%}%>
                        </div>
                        <div class="sl-news-title ">
                            <p class="sl-title-font"><%= articleList[i].name %></p>
                            <span class="sl-title-time">

                                <%=articleList[i].bookcase.name %>
                      <!--          <%  let time
                                    if(articleList[i].effectiveTime){
                                        time = global.tool.dateFormatter(articleList[i].effectiveTime, 'yyyy-MM-dd')
                                    }else{
                                        time = ''
                                    }%>
                                <%= time  %>-->
                            </span>
                        </div>
                    </div>
                </a>
            </div>
            <% }} %>
        </div>
    </div>
    <%}else{%>
    <img src="<%=global.config.path.publicPath%>/custom/images/icon/nomore.png" alt="" class="noMore">
    <h2 class="text-center">暂无更多内容啦</h2>
    <%}%>
</div>
<script src="//cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script>
<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/swiper.min.js"></script>
<script src="<%= global.config.path.publicPath %>/custom/js/articleTemplate.js"></script>

<script>
    $('#searchInput').change(function () {
        let condition = $(this).val();
        location.href = '<%= global.config.path.contextPath %>/fengqi/article/search?con=' + condition + '&id=<%= id||'' %>'
    });
    function submitForm() {
        return false
    }
</script>
</body>
</html>
